<?php
/* @var $this CategoryAdminController */
/* @var $model Category */
/* @var $form CActiveForm */
?>
<div class="row-fluid sortable">
	<div class="box span12">
		<div class="box-header well" data-original-title>
			<h2>
				<i class="icon-edit">
				</i>
				Tìm kiếm
			</h2>
			<div class="box-icon">
				<?php FormHelper::getBoxIcon(); ?>
			</div>
		</div>
		<div class="box-content">
			<?php $form=$this->beginWidget('CActiveForm', array(
            	'action'=>Yii::app()->createUrl($this->route),
            	'method'=>'get',
                'htmlOptions'=>array(
                    'class'=>'form-horizontal',
                ),
            )); ?>
				<fieldset>
					<div class="control-group">
						<?php echo $form->label($model,'category_id',array('class'=>'control-label','for'=>'typeahead')); ?>
						<div class="controls">
							<?php echo $form->textField($model,'category_id',array('class'=>'span6 typeahead','id'=>'typeahead')); ?>
						</div>
					</div>
                    <div class="control-group">
						<?php echo $form->label($model,'category_name',array('class'=>'control-label','for'=>'typeahead')); ?>
						<div class="controls">
							<?php echo $form->textField($model,'category_name',array('size'=>50,'maxlength'=>50)); ?>
						</div>
					</div>
                    <div class="control-group">
						<?php echo $form->label($model,'category_parent',array('class'=>'control-label','for'=>'typeahead')); ?>
						<div class="controls">
							<?php echo $form->dropDownList($model,'category_parent',CHtml::listData(Category::model()->findAll('category_parent is null'),'category_id','category_name'),array('prompt'=>' -- Chọn danh mục cha -- ')); ?>
						</div>
					</div>
					<div class="form-actions">
						<?php echo CHtml::submitButton('Tìm kiếm',array('class'=>'btn btn-primary')); ?>
					</div>
				</fieldset>
			<?php $this->endWidget(); ?>
		</div>
	</div>
	<!--/span-->
</div>